<template>
<view class="container">
	<image :src="`/gongyi/common/download?name=${aSecond.pictureUrl}`" class="aaa"></image>
	<view class="example">
		<!-- 基础用法，不包含校验规则 -->
		<uni-forms  labelWidth="80px">
			<uni-forms-item label="商品名: ">
				<text>{{aSecond.name}}</text>
			</uni-forms-item>
			<uni-forms-item label="价格  :" >
				<text>{{aSecond.price}}</text>
			</uni-forms-item>
			<uni-forms-item label="联系方式  :">
				<text>{{aSecond.contact}}</text>
			</uni-forms-item>
			<uni-forms-item label="地址: ">
				<text>{{aSecond.address}}</text>
			</uni-forms-item>
			<uni-forms-item label="简介: ">
				<text>{{aSecond.textMessage}}</text>
			</uni-forms-item>
			
			</uni-forms>
			</view>
		
		<view class="submit-btn">
			<button type="primary"> 如有需要请自行联系</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				aSecond:{},
				
			};
		},
        onLoad: function(option) { //option为object类型，会序列化上个页面传递的参数
            this.userId = uni.getStorageSync("user").id;
            uni.request({
                url: '/gongyi/second/getDetail?id=' + option.id,
                success: (res) => {
                    this.aSecond = res.data.aSecond,
                        console.log(this.aSecond)
                }
            })
        },
	}
</script>

<style lang="scss">
	.title-input {
		border-bottom: 1px solid #f5f5f5;
		margin: 20rpx 0;
		padding: 20rpx 0;
	}
	
	.post-txt {
		width: 100%;
		padding: 20rpx 0;
		min-height: 300rpx;
	}
	
	.upload-wrap {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		width: 180rpx;
		height: 180rpx;
		background-color: #f5f5f5;
		margin-top: 30rpx;
		border-radius: 10rpx;
	
		.icon {
			width: 50rpx;
			height: 50rpx;
		}
	
		text {
			font-size: 24rpx;
		}
	}
	
	.upload-video {
		width: 180rpx;
		height: 180rpx;
		margin-top: 30rpx;
	}
	
	.choose-item {
		display: flex;
		align-items: center;
		padding: 30rpx 0;
		border-bottom: 1px solid #F5F5F5;
	
		.txt {
			font-weight: bold;
			margin-right: 60rpx;
		}
	
		input {
			flex: 1;
			margin-left: auto;
			text-align: right;
		}
	}
	
	.submit-btn {
			display: flex;
			align-items: center;
			height: 35px;
			line-height: 35px;
			margin-left: 10px;
	}.aaa{
		align-items: center;
		padding-left: 80rpx;
		border-radius: 5%;
	}

</style>
